package Control;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Fichier {
	public List<Args> loadfichier(String nomFichier) throws FileNotFoundException{
		List<Args> tabargs = new ArrayList<Args>();
		
		Scanner scanner = new Scanner(new FileReader("test.txt"));
		String str = null;
		String[] temp = null;
		while (scanner.hasNext()){
			str = scanner.nextLine();
			//System.out.println(str);
			temp = str.split(",");
			//System.out.println(temp[0]);
			tabargs.add(new Args(temp[0], Double.parseDouble(temp[1]), Double.parseDouble(temp[2]), Double.parseDouble(temp[3]), Double.parseDouble(temp[4]), Double.parseDouble(temp[5]), Double.parseDouble(temp[6]), Integer.parseInt(temp[7]), Integer.parseInt(temp[8])));
		}
		return tabargs;
	}
}
